import { sourcingRequest } from '@api/service/sourcing';
/**
 * 厂直标准
**/
// 厂直标准 - 列表查询 configType 1-供应商，2-钢材类
export const queryFactoryStandardListService = (data, loadingFn) => sourcingRequest({
  url: 'factoryDirectConfig/listFactoryDirectConfig',
  type: 'post',
  data,
  loadingFn
})

// 厂直标准 - 导出
export const exportFactoryStandardService = (data, loadingFn) => sourcingRequest({
  url: 'factoryDirectConfig/exportFactoryDirectConfigList',
  type: 'post',
  data,
  loadingFn,
  isExport: true
})

// 查询详情 - 根据所选ID
export const queryStandardDetailByIdsService = (data, loadingFn) => sourcingRequest({
  url: 'factoryDirectConfig/getInfoByIds',
  type: 'post',
  data,
  loadingFn,
})

// 查询详情 - 根据单据ID
export const queryStandardDetailByRecordService = (data, loadingFn) => sourcingRequest({
  url: 'factoryDirectConfig/getRecordInfoById',
  type: 'get',
  data,
  loadingFn,
})

// 提交
export const submitStantardService = (data, loadingFn) => sourcingRequest({
  url: 'factoryDirectConfig/submit',
  type: 'post',
  data,
  loadingFn,
})

// 待审核列表查询
export const queryStandardAuditListService = (data, loadingFn) => sourcingRequest({
  url: 'factoryDirectConfig/auditList',
  type: 'post',
  data,
  loadingFn
})

// 待审核 - 删除
export const deleteStandardRecordService = (data, loadingFn) => sourcingRequest({
  url: 'factoryDirectConfig/deleteRecordInfoById',
  type: 'get',
  data,
  loadingFn
})

// 厂直标准 - 新增/编辑导出模板
export const exportFactoryStandardTempService = (data, loadingFn) => sourcingRequest({
  url: 'factoryDirectConfig/exportFactoryDirectConfigDetails',
  type: 'post',
  data,
  loadingFn,
  isExport: true
})

// 待审核 - 取回
export const cancelStandardRecordService = (data, loadingFn) => sourcingRequest({
  url: 'purchaseTypeConfig/retrieveRecordById',
  type: 'get',
  data,
  loadingFn
})
